package com.liyunc.demo.bundle.user.org.model.entity;

import com.liyunc.demo.comp.common.db.JpaIdStrategy;
import com.liyunc.demo.comp.entity.base.AuditableEntity;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @author liyuncong
 * @version 1.0
 * @file UserPerson.java
 * @brief UserPerson
 * @details UserPerson
 * @date 2022-04-01
 *
 * Edit History
 * ----------------------------------------------------------------------------
 * DATE                        NAME               DESCRIPTION
 * 2022-04-01                  liyuncong          Created
 */
@Entity
@Table(name = "user_person")
@SQLDelete(sql = "UPDATE user_person SET row_status=0 WHERE id=?")
@Where(clause = "row_status=1")
@Getter
@Setter
public class UserPerson extends AuditableEntity {
    @Id
    @GeneratedValue(generator = JpaIdStrategy.SNOW_FLAKE)
    private Long id;
    private String username;
    private Integer gender;
    private String email;
    private String phone;
    private Integer authStatus;
}
